{x2;if:!$userhash}
{x2;include:header}
<body>
{x2;include:nav}
<div class="container-fluid">
	<div class="row-fluid">
		<div class="main">
			<div class="col-xs-2" style="padding-top:10px;margin-bottom:0px;">
				{x2;include:menu}
			</div>
			<div class="col-xs-10" id="datacontent">
	{x2;endif}
				<div class="box itembox" style="margin-bottom:0px;border-bottom:1px solid #CCCCCC;">
					<div class="col-xs-12">
						<ol class="breadcrumb">
							<li><a href="index.php?{x2;$_app}-master">{x2;$apps[$_app]['appname']}</a></li>
							<li class="active">用户管理</li>
						</ol>
					</div>
				</div>
				<div class="box itembox" style="padding-top:10px;margin-bottom:0px;">
					<h4 class="title" style="padding:10px;">
						用户列表
						<span class="pull-right">
							<a data-toggle="dropdown" class="btn btn-primary dropdown-toggle" href="#">添加用户&nbsp;<strong class="caret"></strong></a>
							<ul class="dropdown-menu">
								<li><a href="index.php?user-master-user-add">单个用户</a></li>
								<li><a href="index.php?user-master-user-batadd">从csv文件导入</a></li>
							</ul>
						</span>
					</h4>
					<form action="index.php?user-master-user" method="post" style="margin-top:10px;" class="form-inline">
						<table class="table">
					        <tr>
								<td style="border-top:0px;">
									用户ID：
								</td>
								<td style="border-top:0px;">
									<input name="search[userid]" class="form-control" size="15" type="text" class="number" value="{x2;$search['userid']}"/>
								</td>
								<td style="border-top:0px;">
									注册时间：
								</td>
								<td style="border-top:0px;">
									<input class="form-control datetimepicker" data-date="{x2;date:TIME,'Y-m-d'}" data-date-format="yyyy-mm-dd" type="text" name="search[stime]" size="10" id="stime" value="{x2;$search['stime']}"/> - <input class="form-control datetimepicker" data-date="{x2;date:TIME,'Y-m-d'}" data-date-format="yyyy-mm-dd" size="10" type="text" name="search[etime]" id="etime" value="{x2;$search['etime']}"/>
								</td>
								<td style="border-top:0px;">
									用户名：
								</td>
								<td style="border-top:0px;">
									<input class="form-control" name="search[username]" size="15" type="text" value="{x2;$search['username']}"/>
								</td>
							</tr>
					        <tr>
								<td>
									电子邮箱：
								</td>
					        	<td>
					        		<input class="form-control" name="search[useremail]" size="15" type="text" value="{x2;$search['useremail']}"/>
					        	</td>
					        	<td>
									用户组：
								</td>
								<td>
									<select name="search[groupid]" class="form-control">
								  		<option value="0">不限</option>
								  		{x2;tree:$groups,group,gid}
								  		<option value="{x2;v:group['groupid']}"{x2;if:$search['groupid'] == v:group['groupid']} selected{x2;endif}>{x2;v:group['groupname']}</option>
								  		{x2;endtree}
							  		</select>
								</td>
								<td>
									<button class="btn btn-primary" type="submit">提交</button>
								</td>
								<td></td>
					        </tr>
						</table>
						<div class="input">
							<input type="hidden" value="1" name="search[argsmodel]" />
						</div>
					</form>
					<form action="index.php?user-master-user-batdel" method="post">
						<table class="table table-hover table-bordered">
							<thead>
								<tr class="info">
									<th><input type="checkbox" class="checkall" target="delids"/></th>
									<th>ID</th>
									<th>用户名</th>
									<th>电子邮件</th>
									<th>注册IP</th>
									<th>积分点数</th>
									<th>角色</th>
									<th>注册时间</th>
									<th>操作</th>
								</tr>
							</thead>
							<tbody>
								{x2;tree:$users['data'],user,uid}
								<tr>
									<td>{x2;if:v:user['userid'] != $_user['userid']}<input type="checkbox" name="delids[{x2;v:user['userid']}]" value="1">{x2;endif}</td>
									<td>{x2;v:user['userid']}</td>
									<td>{x2;v:user['username']}</td>
									<td>{x2;v:user['useremail']}</td><td>{x2;v:user['userregip']}</td>
									<td>{x2;v:user['usercoin']}</td><td>{x2;$groups[v:user['usergroupid']]['groupname']}</td>
									<td>{x2;date:v:user['userregtime'],'Y-m-d'}</td>
									<td>
										<div class="btn-group">
											<a class="btn" href="index.php?user-master-user-modify&userid={x2;v:user['userid']}&page={x2;$page}{x2;$u}"><em class="glyphicon glyphicon-edit"></em></a>
											{x2;if:v:user['userid'] != $_user['userid']}
											<a msg="删除后不能恢复，您确定要进行此操作吗？" class="btn confirm" href="index.php?user-master-user-del&userid={x2;v:user['userid']}&page={x2;$page}{x2;$u}"><em class="glyphicon glyphicon-remove"></em></a>
											{x2;endif}
										</div>
									</td>
								</tr>
								{x2;endtree}
							</tbody>
						</table>
						<div class="form-group">
				            <div class="controls">
					            <label class="radio-inline">
					                <input type="radio" name="action" value="delete" checked/>删除
					            </label>
                                {x2;if:is_array($search)}
					            {x2;tree:$search,arg,sid}
					            <input type="hidden" name="search[{x2;v:key}]" value="{x2;v:arg}"/>
					            {x2;endtree}
                                {x2;endif}
					            <label class="radio-inline">
					            	<button class="btn btn-primary" type="submit">提交</button>
					            </label>
					        </div>
				        </div>
					</form>
					<ul class="pagination pull-right">
						{x2;$users['pages']}
					</div>
				</div>
			</div>
{x2;if:!$userhash}
		</div>
	</div>
</div>
{x2;include:footer}
<script type="text/javascript" src="https://s9.cnzz.com/z_stat.php?id=1277952714&web_id=1277952714" async="async"></script>
</body>
</html>
{x2;endif}
